
/***********************************************************************\
|    Authors:         Johanna Eberle, Alexandra Schmucker               |
|    Date:            June 2017                                         |
|    SIAB version:    7514 v1                                           |
|    Purpose:         Generation of cross-sectional data and            |
|                     biographical variables                            |
|    Do-file version: v0                                                |
|                                                                       |
|    List of changes                                                    |
|    --------------------                                               |
|    -                                                                  |
|                                                                       |
\***********************************************************************/

/*------------------------------------------------------------------------------------------------*\
                                  MASTER DO-FILE SIAB CROSS SECTIONS
\*------------------------------------------------------------------------------------------------*/

/* 
THE FOLLOWING VARIABLES ARE REQUIRED: 
persnr betnr spell quelle begorig endorig begepi endepi tentgelt teilzeit erwstat grund
*/

*------------------*
* STATA VERSION
*------------------*
version 14
clear
set more off
set linesize 157

*------------------*
* MACROS FOR PATHS *
*------------------*

/*
File paths are specified with global macros. The macros are automatically available in JoSuA and on-site at the FDZ.
For use with the test data, please define the macros as described in the FDZ guidelines for on-site use and remote data access.
For all other purposes, please define the macros as in the example below:

global orig "c:\mypath\orig"    // folder of the basic data
global data "c:\mypath\data"    // folder of the generated data
global prog "c:\mypath\prog"    // folder of the do-files
global log  "c:\mypath\log"     // folder of the log-files
*/

*------------------------------*
* MACROS FOR FILENAMES         *
* Please modify if necessary   *
*------------------------------*

global dataname "siab_7514_v1"
global logname  "siab_7514_v1"


*-------------------------------*
* DEFINE CUTOFF DATES AND YEARS *
* Please fill in                *
*-------------------------------*

*global cutoff "mm-dd"	// Insert cutoff dates as "mm-dd", use spaces
*global years YYYY/YYYY	// Insert years as numlist

* Example: end of the quarters for the years 2010-2014
global cutoff "01-07 01-14 01-21 01-28 02"	
global years 2010/2014



*----------------------*
* CALL PROGRAMS        *
*----------------------*

do ${prog}/01_SIAB_bio.do
do ${prog}/02_SIAB_quer.do


*-------------------------------*
* DELETION OF INTERMEDIATE FILE *
*-------------------------------*

erase ${data}/${dataname}_bio.dta

exit
